#include <stdio.h>
#include <string.h>
#include <unistd.h>

int main()
{

  //c语言自带函数
  printf("hello printf\n");
  fprintf(stdout, "stdout fprintf\n");
   
  // 系统调用
  const char * msg = "hello yumoz system call\n";
  write(1, msg, strlen(msg));
  
  fork();

 // printf("hello printf\n");
 // perror("helllo perror");
 // fprintf(stdout, "stdout fprintf\n");
 // fprintf(stderr, "sterr fprintf\n");
  //fflush(stdout);
  //sleep(2);
  //FILE *fp = fopen("myfile","w");
  //if(!fp){
  //  printf("open error\n");
  //}

  //const char *msg = "hell yumoz\n";
  //fwrite(msg, strlen(msg), 1, stdout);

  //fprintf(stdout, "hello yumoz\n");
  return 0;
}
